package com.mysql.study.Dao;

import com.mysql.study.entity.Goods;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface GoodsDao {
    //根据主键删除数据
    int deleteByPrimaryKey(Integer goodsId);
    //添加数据
    int insert(Goods record);
    //选择性添加数据
    int insertSelective(Goods record);
    //根据主键查询数据
    Goods selectByPrimaryKey(Integer goodsId);
    //根据主键选择性添加数据
    int updateByPrimaryKeySelective(Goods record);
    //根据主键添加数据
    int updateByPrimaryKey(Goods record);
    //查询所有数据
    List<Goods> selectAllGoods();
}